package TEST3;

public class A01 {
    String name;
    String sex;
    int age;

    //对于年龄的设置的要求
    public void setAge(int age) {
        if (age>0 && age<100)
            this.age = age;
        else
            this.age = 0;
    }

    public void Csj13() {
    }

    public void Csj13(String name, String sex, int age) {
        super();
        this.name = name;
        this.sex = sex;
        this.setAge(age);
    }

    @Override
    public String toString() {
        return "姓名：" + name + ", 性别：" + sex + ", 年龄：" + age;
    }

}
